package sheshen.come.cn.sheshen.feature.adapter;

import android.content.Context;
import android.view.View;
import android.view.ViewGroup;
import android.widget.TextView;

import java.util.List;

import sheshen.come.cn.sheshen.R;
import sheshen.come.cn.sheshen.base.adpter.MyBaseAdapter;

/**
 * Created by MyPC on 2017/2/20.
 */

public class FeatureListAdapter extends MyBaseAdapter<String> {

    public FeatureListAdapter(Context context, List<String> data) {
        super(context, data);
    }

    @Override
    public View getView(int position, View view, ViewGroup viewGroup) {
        ViewHolder vh;
        if (view==null){
            view = View.inflate(context, R.layout.item_recelview_featrue,null);
            vh = new ViewHolder();
            vh.tv = (TextView) view.findViewById(R.id.receleview_tv);
            view.setTag(vh);
        }else{
            vh = (ViewHolder) view.getTag();
        }
        vh.tv.setText(data.get(position));
        return view;
    }

    class ViewHolder{
        TextView tv;
    }
}
